<template>
<div class="card_box">
  <div @click="dialogTableVisible = true">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span>消费金额</span>
      </div>
      <div class="card_number">
          115
      </div>
    </el-card>
  </div>
  <el-dialog title="消费金额" :visible.sync="dialogTableVisible" @close="close" width="60%" center>
    <div class="carddia_content">
      <div class="carddua_content_t">
        <div class="carddua_content_t_l">
          地区
        </div>
        <div class="carddua_content_t_r">
          <el-radio-group v-model="custom_manager" class="radio_group" @change="selectChange">
            <el-radio label="">全部</el-radio>
            <el-radio label="洛阳">类型1</el-radio>
            <el-radio label="郑州">类型2</el-radio>
            <el-radio label="北京">类型3</el-radio>
          </el-radio-group>
        </div>
      </div>
      <div class="carddua_content_b">
        <el-table
          :data="tableData"
          style="width: 100%">
          <el-table-column
            prop="name"
            label="用户名称"
            width="180">
          </el-table-column>
          <el-table-column
            prop="tel"
            label="联系方式"
            width="180">
          </el-table-column>
          <el-table-column
            prop="update"
            label="更新时间"
            width="180">
          </el-table-column>
          <el-table-column
            prop="ludate"
            label="录入时间">
          </el-table-column>
          <el-table-column
            prop="address"
            label="用户地址">
          </el-table-column>
        </el-table>
      </div>
    </div>
    <el-pagination
      class="pagination"
      layout="prev, pager, next"
      :total=total
      @current-change="pageChange"
      @prev-click="goPrev"
      @next-click="goNext">
    </el-pagination>
  </el-dialog>
</div>
</template>

<script>
export default {
  name: 'cash',
  data() {
    return {
      dialogTableVisible: false,
      custom_manager: '',
      total: 60,
      tableData: [{
        update: '2016-05-02',
        ludate: '2016-05-02',
        tel: '1390356582',
        name: '王小虎',
        address: '上海市普陀区金沙江路 1518 弄'
      }, {
        update: '2016-05-04',
        ludate: '2016-05-02',
        name: '王小虎',
        tel: '1390356582',
        address: '上海市普陀区金沙江路 1517 弄'
      }, {
        update: '2016-05-01',
        ludate: '2016-05-02',
        name: '王小虎',
        tel: '1390356582',
        address: '上海市普陀区金沙江路 1519 弄'
      }, {
        update: '2016-05-03',
        ludate: '2016-05-02',
        name: '王小虎',
        tel: '1390356582',
        address: '上海市普陀区金沙江路 1516 弄'
      }]
    }
  },
  methods: {
    close() {
      this.dialogTableVisible = false
    },
    selectChange(val) {
      this.custom_manager = val
      // alert(this.custom_manager)
    },
    pageChange(index) {
      // alert(index)
    },
    goNext() {
      alert()
    },
    goPrev() {
      alert()
    }
  },
  computed: {
    // key() {
    //   return this.$route.name !== undefined ? this.$route.name + +new Date() : this.$route + +new Date()
    // }
  }
}
</script>

<style scoped>
.card_box {
  width: 48%;
}
.box-card {
  width: 100%;
  margin-bottom: 20px;
  cursor: pointer;
}
.card_number {
  font-size: 80px;
  text-align: center;
  line-height: 70px;
  padding:20px;
}
.card_number:hover {
  color: #258649
}
.carddua_content_t {
  display: flex;
  height: 30px;
  padding: 10px;
  padding-left: 0px;
}
.carddua_content_t_l {
  margin-right: 20px;
}
.carddua_content_b {
  margin-top: 30px;
}
.pagination {
  text-align: center;
  margin-top: 30px;
}
</style>